#include "header.h"
int cycle_lenght(long int n)
{
    int count=1;
    while(n!=1)
    {
               if(n%2==0) n/=2;
               else n=n*3+1;
               count++;
               }
    return count;
}
void cau2()
{
     long int i,j,k;
     int max;
     while(EOF)
     {
               scanf("%ld %ld",&i,&j);
               if(i>j)
               {
                      int t=i;
                      i=j;
                      j=t;
                      }
               max=cycle_lenght(i);
               for(k=i;k<=j;k++)
               if(max<cycle_lenght(k)) max=cycle_lenght(k);
               printf("%ld %ld %d",i,j,max);
               }
}
     
     
